﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="calculation.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= ViewData["Name"]%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%= ViewData["Name"]%></h2>
    <%= Html.ActionLink("Добавить новую деталь","Add") %>
    <table>
        <tr>
            <td>
                
            </td>
            <td>
                Название детали
            </td>
            <td>
                Тип детали
            </td>
        </tr>
        <%
            foreach (Detal d in (IEnumerable<Detal>)ViewData["Detals"])
            {%>
        <tr>
            <td>
                <%= Html.ActionLink("Посмотреть", "Detal", new { id = d.DetalId})%>
            </td>
            <td>
                <%=d.NameDetal%>
            </td>
            <td>
                <%=d.TypeDetal %>
            </td>
        </tr>
        <% }%>
    </table>

</asp:Content>
